package com.cc.bsp.persistence.hibernate;

import java.util.List;
import java.util.Map;

import com.cc.bsp.persistence.IQLDao;
import com.cc.bsp.persistence.IQueryPageOrder;
import com.cc.bsp.persistence.exception.PersistenceException;

public interface IHXQLDao extends IQLDao{
	
	<X> X findUniqueByHQL(final String hql, final Object... propertyParameters)throws PersistenceException;
	
	<X> X findUniqueBySQL(final String sql, final Object... propertyParameters)throws PersistenceException;;
	
	<X> List<X> findByHQL(final String hql,final Object... propertyParameters)throws PersistenceException;
	
	<X> List<X> findByHQL(final String hql,final IQueryPageOrder pageorder,final Object... propertyParameters)throws PersistenceException;
	
	<X> List<X> findBySQL(final String sql,final Object... propertyParameters)throws PersistenceException;
	
	<X> List<X> findBySQL(final String sql,final IQueryPageOrder pageorder,final Object... propertyParameters)throws PersistenceException;
	
	<X> List<X> findByNamedQL(final String namedQL,final IHRootDao.TYPE type,final Object... javaBeans)throws PersistenceException;
	
	<X> List<X> findByNamedQL(final String namedQL,final IHRootDao.TYPE type,final IQueryPageOrder pageorder,final Object... javaBeans)throws PersistenceException;
	
	<X> List<X> findByNamedQL(final String namedQL,final IHRootDao.TYPE type,final Map<String,?> parameters)throws PersistenceException;
	
	<X> List<X> findByNamedQL(final String namedQL,final IHRootDao.TYPE type,final IQueryPageOrder pageorder,final Map<String,?> parameters)throws PersistenceException;
	
	void batchExecuteHQL(final String hql, final Object... propertyParameters)throws PersistenceException;
	 
	void batchExecuteSQL(final String sql, final Object... propertyParameters)throws PersistenceException;
	
	void batchExecuteHQL(final String hql, final Map<String, ?> parameters)throws PersistenceException;
	
	void batchExecuteSQL(final String sql, final Map<String, ?> parameters)throws PersistenceException;
	
}
